home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet internetowy / Rozne / HTTrack 3.40-2 / httrack-3.40-2.exe / {app} / src_win / WinHTTrack / DirTreeView.h < prev    next >
C/C++ Source or Header  |  2000-11-19  |  4KB  |  118 lines

  1. #if !defined(AFX_DIRTREEVIEW_H__DFB224E0_828F_426D_A9A3_471D7A2F5108__INCLUDED_)
  2. #define AFX_DIRTREEVIEW_H__DFB224E0_828F_426D_A9A3_471D7A2F5108__INCLUDED_
  3.  
  4. #if _MSC_VER > 1000
  5. #pragma once
  6. #endif // _MSC_VER > 1000
  7. // DirTreeView.h : header file
  8. //
  9.  
  10. #include <afxcview.h>
  11. #include "TreeViewToolTip.h"
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CDirTreeView view
  15.  
  16. class CDirTreeView : public CTreeView
  17. {
  18. protected:
  19.     CDirTreeView();           // protected constructor used by dynamic creation
  20.     DECLARE_DYNCREATE(CDirTreeView)
  21. protected:
  22.   UINT timer;
  23.   HANDLE    whandle[1024];
  24.   HTREEITEM pos_whandle[1024];
  25.   int       count_whandle;
  26.   void StartTimer();
  27.   void StopTimer();
  28.   //
  29.   void BuildTrackHandles();
  30.   void DestroyTrackHandles();
  31.   void DoTrackHandles();
  32.  
  33. // Attributes
  34. public:
  35.     CTreeViewToolTip m_TreeViewToolTip;
  36.   //
  37.   CString refreshPath;      /* callback */
  38.   CString docType;          /* document type (ex: .doc) */
  39.   //
  40.   int redraw_in_progress;
  41.  
  42. // Operations
  43. public:
  44.   void RefreshTree();
  45.   BOOL EnsureVisible(CString path);
  46.   BOOL EnsureVisibleBl(CString path);
  47.   void ResetTree();
  48.   void WaitThreads();
  49.  
  50. protected:
  51.   BOOL RefreshDir(HTREEITEM position,BOOL nohide=FALSE);
  52.   void RestoreVisibles(HTREEITEM position,CString& backup_visibles);
  53.   void RefreshPos(HTREEITEM position);
  54.   CString GetItemPath(HTREEITEM position);
  55.   HTREEITEM GetPathItem(CString path,BOOL open=FALSE,BOOL nofail=FALSE,BOOL nohide=FALSE,HTREEITEM rootposition=NULL);
  56.   CString GetItemName(HTREEITEM position);
  57.   //
  58.   CImageList imagelist;
  59.  
  60. // Overrides
  61.     // ClassWizard generated virtual function overrides
  62.     //{{AFX_VIRTUAL(CDirTreeView)
  63.     public:
  64.     virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
  65.     protected:
  66.     virtual void OnDraw(CDC* pDC);      // overridden to draw this view
  67.     //}}AFX_VIRTUAL
  68.  
  69. // Implementation
  70. protected:
  71.     virtual ~CDirTreeView();
  72. #ifdef _DEBUG
  73.     virtual void AssertValid() const;
  74.     virtual void Dump(CDumpContext& dc) const;
  75. #endif
  76.  
  77.     // Generated message map functions
  78. protected:
  79.     //{{AFX_MSG(CDirTreeView)
  80.     afx_msg void OnTimer(UINT nIDEvent);
  81.     afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
  82.     afx_msg void OnItemexpanding(NMHDR* pNMHDR, LRESULT* pResult);
  83.     afx_msg void OnDblclk(NMHDR* pNMHDR, LRESULT* pResult);
  84.     afx_msg void OnRclick(NMHDR* pNMHDR, LRESULT* pResult);
  85.     afx_msg void OnEndlabeledit(NMHDR* pNMHDR, LRESULT* pResult);
  86.     afx_msg void OnKeydown(NMHDR* pNMHDR, LRESULT* pResult);
  87.     afx_msg void OnClick(NMHDR* pNMHDR, LRESULT* pResult);
  88.     afx_msg void OnKillFocus(CWnd* pNewWnd);
  89.     afx_msg void OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult);
  90.     //}}AFX_MSG
  91.     DECLARE_MESSAGE_MAP()
  92. };
  93.  
  94. /////////////////////////////////////////////////////////////////////////////
  95.  
  96. /////////////////////////////////////////////////////////////////////////////
  97. // CDirTreeViewShellEx
  98. /*
  99. class CDirTreeViewShellEx : public CWinThread
  100. {
  101.   DECLARE_DYNAMIC(CDirTreeViewShellEx)
  102. public:
  103.   CString File;
  104.   virtual BOOL InitInstance( );
  105. };
  106. */
  107. UINT CDirTreeViewShellEx( LPVOID pP );
  108. UINT CDirTreeViewRefresh( LPVOID pP );
  109.  
  110. //{{AFX_INSERT_LOCATION}}
  111. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  112.  
  113.  
  114.  
  115.  
  116.  
  117. #endif // !defined(AFX_DIRTREEVIEW_H__DFB224E0_828F_426D_A9A3_471D7A2F5108__INCLUDED_)
  118.